import 'package:finance_app/generated/json/base/json_convert_content.dart';
import 'package:finance_app/generated/json/base/json_field.dart';

class CurrentSubscriptionEntity with JsonConvert<CurrentSubscriptionEntity> {
  CurrentSubscriptionPlan plan;
  CurrentSubscriptionSubscription subscription;
  @JSONField(name: "is_renew_failed")
  int isRenewFailed;
  @JSONField(name: "is_transaction_over_limit")
  int isTransactionOverLimit;
  @JSONField(name: "is_trial")
  int isTrial;
  int flag;
  List<PromoEntity> promos;
  List<MessageEntity> messages;
}

class PromoEntity with JsonConvert<PromoEntity> {
  String title;
  String content;
}

class MessageEntity with JsonConvert<MessageEntity> {
  String type;
  String info;
}

class CurrentSubscriptionPlan with JsonConvert<CurrentSubscriptionPlan> {
  int id;
  String type;
  String name;
  @JSONField(name: "name_text")
  String nameText;
  String price;
  @JSONField(name: "price_text")
  String priceText;
  String description;
  @JSONField(name: "transaction_limit")
  int transactionLimit;
  @JSONField(name: "transaction_count")
  dynamic transactionCount;
  @JSONField(name: "is_current_subscribed")
  dynamic isCurrentSubscribed;
}

class CurrentSubscriptionSubscription
    with JsonConvert<CurrentSubscriptionSubscription> {
  int id;
  @JSONField(name: "coupon_id")
  dynamic couponId;
  @JSONField(name: "user_id")
  int userId;
  @JSONField(name: "payment_gateway_id")
  dynamic paymentGatewayId;
  @JSONField(name: "company_id")
  int companyId;
  @JSONField(name: "plan_id")
  int planId;
  @JSONField(name: "start_at")
  String startAt;
  @JSONField(name: "end_at")
  String endAt;
  @JSONField(name: "issued_at")
  String issuedAt;
  @JSONField(name: "due_at")
  dynamic dueAt;
  @JSONField(name: "notified_at")
  dynamic notifiedAt;
  int renew;
  @JSONField(name: "bill_to_company_id")
  dynamic billToCompanyId;
  @JSONField(name: "bill_phone_number")
  dynamic billPhoneNumber;
  @JSONField(name: "bill_contact_name")
  dynamic billContactName;
  @JSONField(name: "bill_postal_code")
  dynamic billPostalCode;
  @JSONField(name: "bill_unit_number")
  dynamic billUnitNumber;
  @JSONField(name: "bill_address")
  dynamic billAddress;
  @JSONField(name: "bill_company_name")
  dynamic billCompanyName;
  @JSONField(name: "bill_country_code")
  dynamic billCountryCode;
  @JSONField(name: "payment_gateway_status")
  dynamic paymentGatewayStatus;
  @JSONField(name: "payment_method")
  dynamic paymentMethod;
  @JSONField(name: "card_number")
  dynamic cardNumber;
  @JSONField(name: "next_price")
  int nextPrice;
  int price;
  @JSONField(name: "original_price")
  int originalPrice;
  String status;
  @JSONField(name: "created_at")
  String createdAt;
  @JSONField(name: "updated_at")
  String updatedAt;
  @JSONField(name: "deleted_at")
  dynamic deletedAt;
  CurrentSubscriptionSubscriptionPlan plan;
}

class CurrentSubscriptionSubscriptionPlan
    with JsonConvert<CurrentSubscriptionSubscriptionPlan> {
  int id;
  String type;
  String name;
  String icon;
  @JSONField(name: "transaction_limit")
  int transactionLimit;
  String price;
  String status;
  @JSONField(name: "created_at")
  String createdAt;
  @JSONField(name: "updated_at")
  String updatedAt;
}
